package com.lianbang.pharmacy.module.user

import android.app.Activity
import android.content.Context
import android.content.Intent

import com.lianbang.pharmacy.R
import cn.ubest.mvvmcore.base.BaseActivity
import cn.ubest.mvvmcore.utils.LogUtils
import com.lianbang.pharmacy.databinding.ActivityMyScoreBinding
import com.lianbang.pharmacy.util.LoginUtils
import com.lianbang.pharmacy.vm.MainVM
import kotlinx.android.synthetic.main.activity_my_score.*

class MyScoreActivity : BaseActivity<MainVM, ActivityMyScoreBinding>() {

    companion object {
        fun start(context: Context?) {
            context?.also {
                val starter = Intent(it, MyScoreActivity::class.java)
                if (it !is Activity) {
                    starter.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                }
                it.startActivity(starter)
            }
        }
    }

    override fun initLayout(): Int {
        return R.layout.activity_my_score;

    }

    override fun setToolbarTitle(): String? {
        return "我的积分"
    }

    override fun initData(intent: Intent) {

    }

    override fun initView() {
        LoginUtils.mUserBean?.also {
            tv_score.text = it.integral
        }
    }

    override fun loadData() {

    }
}
